﻿
@model  List<SuperiorModel.Api_MenuItemModel>
@{
    ViewBag.Title = "分类";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var spid = Request["spid"];
    var said = Request["said"];
    var cartCount = ViewHelper.CartCount();
    string pl = "搜索您想要的商品";
    if (Request["keyword"] != null)
    {
        pl = Request["keyword"].ToString() == string.Empty ? "搜索您想要的商品" : Request["keyword"].ToString();
    }

}


<link href="~/Content/css/menuList.css" rel="stylesheet" />
<header class="wy-header" LoadRequstCount="">


    <div class="weui-search-bar" id="searchBar">
        <div class="weui_cell_hd"><img src="@UserContext.User.HeadImgUrl" alt="" /></div>
        <div class="weui-search-bar__form">
            <div class="weui-search-bar__box">
                <i class="weui-icon-search"></i>
                <input type="search" class="weui-search-bar__input" value="@Request["keyword"]" id="searchInput" placeholder="搜索您想要的商品" required>
                <a href="javascript:" class="weui-icon-clear" id="searchClear"></a>
            </div>
            <label class="weui-search-bar__label" id="searchText" style="transform-origin: 0px 0px 0px; opacity: 1; transform: scale(1, 1);">
                <i class="weui-icon-search"></i>
                <span>@pl</span>
            </label>
        </div>
        <a href="javascript:" class="weui-search-bar__cancel-btn" style="color: #ccc;" id="searchCancel">取消</a>
    </div>
</header>
<div>
    <div class='menuLeftDiv'>
        <div MenuId="0" class="leftItem choseMenu ">

            <div class="leftItemText itemOn">全部</div>
        </div>
        @foreach (var item in Model)
        {
            <div MenuId="@item.Id" class="leftItem choseMenu">

                <div class='leftItemText'>@item.MenuName</div>
            </div>
        }




    </div>
    <div class='menuRightDiv'>
        <div class='demos-content-padded proListWrap'>


            <div class="wy-Module">
                <div class="wy-Module-con">
                    <ul class="wy-pro-list clear" style="background:white" id="list"></ul>
                </div>
            </div>




        </div>
        <div class="weui-loadmore" style="display:none">
            <i class="weui-loading"></i>
            <span class="weui-loadmore__tips">正在加载</span>
        </div>
    </div>
</div>


<!--底部导航-->
<div class="foot-black"></div>
<div class="weui-tabbar wy-foot-menu">
    <a href="/Home/Index?spid=@spid&said=@said" class="weui-tabbar__item ">
        <div class="weui-tabbar__icon foot-menu-home"></div>
        <p class="weui-tabbar__label">首页</p>
    </a>

    <a href="/Product/MenuList?spid=@spid&said=@said" class="weui-tabbar__item weui-bar__item--on">
        <div class="weui-tabbar__icon foot-menu-list"></div>
        <p class="weui-tabbar__label">分类</p>
    </a>
    <a href="/Cart/Index?spid=@spid&said=@said" class="weui-tabbar__item">
        @if (cartCount > 0)
        {
            <span class="weui-badge" style="position: absolute;top: -.4em;right: 1em;">@cartCount</span>
        }
        <div class="weui-tabbar__icon foot-menu-cart"></div>
        <p class="weui-tabbar__label">购物车</p>
    </a>
    <a href="/User/Index?spid=@spid&said=@said" class="weui-tabbar__item">
        <div class="weui-tabbar__icon foot-menu-member"></div>
        <p class="weui-tabbar__label">我的</p>
    </a>
</div>
<script src="~/scripts/Product/MenuProductList.js?v=333"></script>
<script>
    MenuProductList.Instance.Init();
</script>